package de.fuberlin.inf.alp3.ue03;

public class ValueReaderTest {
    public static void main(String[] args) {
        System.out.println("Creating new C Object...");
        C c = new C(1);
        int userInput = -1;
        while (true) {
            System.out.println("  1. fromConsole");
            System.out.println("  2. toString");
            System.out.println("\n  0. Exit application");
            userInput = ValueReader.readInt(0, "Your choice?", "Not a number!");
            switch (userInput) {
            case 0:
                System.out.println("Bye...");
                System.exit(0);
            case 1:
                c.fromConsole(1);
                break;
            case 2:
                System.out.println(c);
                break;
            default:
                System.out.println("Please choose from available options.");
            }
        }
    }
}